const InvoiceManagement = () => import('@/modules/financialSynergy/views/invoiceManagement.vue')
const InvoiceDetail = () => import('@/modules/financialSynergy/components/invoiceDetail.vue')
const StatementManagement = () => import('@/modules/financialSynergy/views/statementManagement.vue')
const StatementManagementDetail = () => import('@/modules/financialSynergy/components/statementManagementDetail.vue')
const paymentApplication = () => import('@/modules/financialSynergy/views/paymentApplication.vue')
const paymentApplicationDetail = () => import('@/modules/financialSynergy/components/paymentApplicationDetail.vue')

const parentRouter = [
  {
    label: '财务协同',
    path: ''
  }
]

const routes = [
  {
    path: '/financialSynergy/invoiceManagement',
    name: 'InvoiceManagement',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '发票管理',
      keepAlive: true
    },
    component: InvoiceManagement
  },
  {
    path: '/financialSynergy/toBeBilledInvoice',
    name: 'toBeBilledInvoice',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '开票通知申请',
      parentTitle: [...parentRouter, { label: '发票管理', path: '/financialSynergy' }],
      keepAlive: true
    },
    component: InvoiceDetail
  },
  {
    path: '/financialSynergy/invoiceDetail',
    name: 'InvoiceDetail',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '开票通知详情',
      parentTitle: [...parentRouter, { label: '发票管理', path: '/financialSynergy' }],
      keepAlive: true
    },
    component: InvoiceDetail
  },
  {
    path: '/financialSynergy/statementManagement',
    name: 'statementManagement',
    meta: {
      title: '对账单管理',
      parentTitle: parentRouter
    },
    component: StatementManagement
  },
  {
    path: '/financialSynergy/statementManagement/detail',
    name: 'statementManagementDetail',
    meta: {
      title: '对账单详情',
      parentTitle: parentRouter
    },
    component: StatementManagementDetail
  },
  {
    path: '/financialSynergy/paymentApplication',
    name: 'paymentApplication',
    meta: {
      title: '付款申请',
      parentTitle: parentRouter
    },
    component: paymentApplication
  },
  {
    path: '/financialSynergy/paymentApplication/detail',
    name: 'paymentApplicationDetail',
    meta: {
      title: '付款申请详情',
      parentTitle: parentRouter
    },
    component: paymentApplicationDetail
  }
]

export default routes
